package cn.highset.modules.base.controller.api;

import cn.highset.base.ApiBaseController;
import cn.highset.common.annotation.IgnoreAuth;
import cn.highset.common.utils.ResultUtil;
import cn.highset.modules.base.service.MiniprogramMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 类 描 述：API 小程序首页菜单信息
 * 创建时间：2019-06-15 10:32
 * 创 建 人：victor
 */
@Slf4j
@RestController
@Api(description = "API菜单信息")
@RequestMapping("/api/miniprogramMenu")
@Transactional
public class ApiMiniprogramMenuController extends ApiBaseController {

    @Autowired
    private MiniprogramMenuService miniprogramMenuService;

    /**
     * @name: 获取菜单列表
     * @description: TODO
     * @return:
     * @date: 2019-06-15 10:41
     * @auther: victor
     */
    @ApiOperation(value = "获取菜单列表")
    @IgnoreAuth
    @PostMapping("list")
    public Object list() {
        return new ResultUtil<Object>().setData(miniprogramMenuService.getList());
    }

}
